//
//  STCommonFile.swift
//  Demo-04-TabBarTest
//
//  Created by 苏统世 on 16/5/11.
//  Copyright © 2016年 SuTon. All rights reserved.
//

import Foundation
import UIKit


//自定义DEBUG下打印：buildSetting -> 搜索 swift flag,在DEBUG模式下配置 -D DEBUG
func STPrint(file: String = __FILE__, line: Int = __LINE__, items: Any){
    #if DEBUG
        print("文件：\((file as NSString).lastPathComponent), 行数: \(line)  ==> \(items)")
    #endif
}

//图片拉伸平铺
func getImageWithSource(image:UIImage)->UIImage{
    
//    return image.resizableImageWithCapInsets(UIEdgeInsets(top: 10, left: 10, bottom: 10, right: 10), resizingMode: UIImageResizingMode.Stretch)
    return image.stretchableImageWithLeftCapWidth(Int(image.size.width*0.5), topCapHeight: Int(image.size.height*0.5))
}

// 全局的背景颜色
let GlobalBKGColor = UIColor.whiteColor()

//let randomColor = UIColor(red: CGFloat(arc4random_uniform(256))/255.0, green: CGFloat(arc4random_uniform(256))/255.0, blue: CGFloat(arc4random_uniform(256))/255.0, alpha: 1)





// Mark: - Oauth授权相关
/// 请求授权界面URL地址
let oauthURLString = "https://api.weibo.com/oauth2/authorize"

/// 申请应用时分配的AppKey
let client_id = "786893862"

/// 授权回调地址
let redirect_uri = "http://www.baidu.com/"

/// 申请应用时分配的AppSecret
let client_secret = "1a12b47b415e092d54743d1e995b750c"









